<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	</head>
	<body>
		<div id="example1">
			<button v-on:click="counter+=1">Add 1</button>
			<p>The button above has been clicked {{counter}} times</p>
			
			<button v-on:click="click1('hh',$event)">单机</button>
			
			<button v-on:dblclick="click2('3333',$event)">双击</button>
			
			
			<button v-on:click="click3">单击</button>
		</div>	
		<script type="text/javascript">
			let app=new Vue({
				el:'#example1',
				data:{
					counter:0
				},
				methods:{
					click1:function(p1,e){
						alert(p1);
						console.log(e);
					},
					click2:function(p1,e){
						alert(p1);
						console.log(e);
					},
					//event 是原生 DOM 事件
					click3:function(event){
						console.log(event.target);
						if(event){
							console.log(event.target);
						}
					}
				}
			})
		</script>	
		<style type="text/css">
			
		</style>
	</body>
</html>
